Skip to content

Conversation

@ajtowns
Copy link

@ajtowns ajtowns commented Sep 9, 2025

Backport of bitcoin#32998 excluding simplifying script_verify_flag_name to an ordinary enum. Includes backport of bitcoin-core/gui#881 due to qt6 bug.

@ajtowns ajtowns force-pushed the 202509-inq29-script-verify-flags branch 2 times, most recently from 3effbba to 26f7c2d Compare September 9, 2025 04:05
hebasto and others added 5 commits September 9, 2025 15:37
Previously the SCRIPT_VERIFY_* flags were specified as either uint32_t,
unsigned int, or unsigned. This converts them to a common type alias in
preparation for changing the underlying type.
`using script_verify_flags = uint32_t` allows implicit conversion to
and from int, so replace it with a class to have the compiler ensure we
use the correct type. Provide from_int and as_int to allow for explicit
conversions when desired.

Introduces the type `script_verify_flag_name` for the individual flag
name enumeration.
@ajtowns ajtowns force-pushed the 202509-inq29-script-verify-flags branch from 26f7c2d to 5c4dea3 Compare September 9, 2025 05:52
@instagibbs
Copy link

concept ACK, seems to match description of upstream PR + backporting changes

@instagibbs
Copy link

#86 runs cleanly on top of this PR, tACK that far at least, and output of binana.h makes sense to me

std::set<script_verify_flags> flags_combos;
for (const auto& pair : mapFlagNames) {
const unsigned int flags_excluding_one = TrimFlags(flags & ~(pair.second));
script_verify_flags flags_excluding_one = TrimFlags(flags & ~(pair.second));
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lost the const

@ajtowns ajtowns merged commit fe05f96 into bitcoin-inquisition:29.x Sep 10, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants